package com.ruoyi.consumer.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.consumer.mapper.CDeviceOrdersMapper;
import com.ruoyi.consumer.domain.CDeviceOrders;
import com.ruoyi.consumer.service.ICDeviceOrdersService;

/**
 * 实时业务实际订单Service业务层处理
 * 
 * @author YFENTEST
 * @date 2023-11-30
 */
@Service
public class CDeviceOrdersServiceImpl implements ICDeviceOrdersService 
{
    @Autowired
    private CDeviceOrdersMapper cDeviceOrdersMapper;

    /**
     * 查询实时业务实际订单
     * 
     * @param deviceOrderId 实时业务实际订单主键
     * @return 实时业务实际订单
     */
    @Override
    public CDeviceOrders selectCDeviceOrdersByDeviceOrderId(Integer deviceOrderId)
    {
        return cDeviceOrdersMapper.selectCDeviceOrdersByDeviceOrderId(deviceOrderId);
    }

    /**
     * 查询实时业务实际订单列表
     * 
     * @param cDeviceOrders 实时业务实际订单
     * @return 实时业务实际订单
     */
    @Override
    public List<CDeviceOrders> selectCDeviceOrdersList(CDeviceOrders cDeviceOrders)
    {
        return cDeviceOrdersMapper.selectCDeviceOrdersList(cDeviceOrders);
    }

    /**
     * 新增实时业务实际订单
     * 
     * @param cDeviceOrders 实时业务实际订单
     * @return 结果
     */
    @Override
    public int insertCDeviceOrders(CDeviceOrders cDeviceOrders)
    {
        cDeviceOrders.setCreateTime(DateUtils.getNowDate());
        return cDeviceOrdersMapper.insertCDeviceOrders(cDeviceOrders);
    }

    /**
     * 修改实时业务实际订单
     * 
     * @param cDeviceOrders 实时业务实际订单
     * @return 结果
     */
    @Override
    public int updateCDeviceOrders(CDeviceOrders cDeviceOrders)
    {
        cDeviceOrders.setUpdateTime(DateUtils.getNowDate());
        return cDeviceOrdersMapper.updateCDeviceOrders(cDeviceOrders);
    }

    /**
     * 批量删除实时业务实际订单
     * 
     * @param deviceOrderIds 需要删除的实时业务实际订单主键
     * @return 结果
     */
    @Override
    public int deleteCDeviceOrdersByDeviceOrderIds(Integer[] deviceOrderIds)
    {
        return cDeviceOrdersMapper.deleteCDeviceOrdersByDeviceOrderIds(deviceOrderIds);
    }

    /**
     * 删除实时业务实际订单信息
     * 
     * @param deviceOrderId 实时业务实际订单主键
     * @return 结果
     */
    @Override
    public int deleteCDeviceOrdersByDeviceOrderId(Integer deviceOrderId)
    {
        return cDeviceOrdersMapper.deleteCDeviceOrdersByDeviceOrderId(deviceOrderId);
    }
}
